String.prototype.trim = function() {
    return this.replace(/^\s+/, '').replace(/\s+$/, '')
}; //原型 this 正则